package com.example.testlistfragment;

import android.os.Bundle;
import android.support.v4.app.ListFragment;
import android.widget.ArrayAdapter;


public class TestListFragment extends ListFragment {
	public static TestListFragment newInstance() {
		return new TestListFragment();
	}

	@Override
	public void onActivityCreated(Bundle savedInstanceState) {
		super.onActivityCreated(savedInstanceState);

		ArrayAdapter<String> adapter = new ArrayAdapter<String>(getActivity(),
				R.layout.list_column, R.id.text);
		setListAdapter(adapter);
		createDataList(adapter, 100);
	}

	private static void createDataList(ArrayAdapter<String> adapter, int counts) {
		for (int i = 0; i < counts; i++) {
			adapter.add("i=" + i);
		}

	}
}
